package com.zy.mc_module.ui.micang;

import android.content.Intent;

import androidx.annotation.NonNull;

import com.zy.mc_module.base.kotlin.BaseActivity;
import com.zy.mc_module.databinding.ActivityRiceDetailBinding;
import com.zy.mc_module.utils.StatusBarUtil;
import com.zy.mc_module.utils.retrofit.error.ThdException;

/**
 * 米粒详情
 */
public class RiceDetailActivity extends BaseActivity<RiceContract.View, RicePresenter, ActivityRiceDetailBinding> implements RiceContract.View {
    @NonNull
    @Override
    public ActivityRiceDetailBinding getViewBinding() {
        return ActivityRiceDetailBinding.inflate(getLayoutInflater());
    }

    @Override
    protected void initView() {
        super.initView();
        StatusBarUtil.setImmersiveStatusBar(this);
        getData();
    }

    private void getData() {
        binding.riceDetailNum.setText(getIntent().getStringExtra("MineRice"));
    }

    @Override
    protected void initListener() {
        super.initListener();
        getBinding().customhead.setLeftClickListener(view -> finish());
        getBinding().customhead.setRightClickListener3(view -> {
            startActivity(new Intent(context, RiceIncomeDetailActivity.class));
        });
    }

    @Override
    public void onError(ThdException error) {

    }

    @Override
    public <T> void onSuccess(T t, int type) {

    }

    @Override
    public void onError(ThdException error, int type) {

    }
}
